bpo-40280: Add wasm cross build targets (GH-29771)#29771
Conversation
0afc925 to
aa16619
Compare
|
FWIW, this is enough to allow me to compile CPython with emscripten with the following settings: However it seems the built |
|
I'm facing the same issue, e.g. wasmtime complaints about missing clock_gettime. I fixed the Did you know that you can put all custom autoconf overrides into a config.site file? I'm using this to run |
brettcannon
left a comment
There was a problem hiding this comment.
I don't know if the current solution will work with wasm32-wasi. We should also make sure to support wasm32-unknown-wasi.
Misc/NEWS.d/next/Build/2021-11-25-10-55-03.bpo-40280.E9-gsQ.rst
Outdated
Show resolved
Hide resolved
|
When you're done making the requested changes, leave the comment: |
|
Do we want to record all the incantations we are trying to make builds work somewhere? E.g. https://bugs.python.org/issue40280 or somewhere else like a GitHub org/repo (I'm happy to create a @ethanhs while I think |
|
configure runs the host and build strings through
For more information see: |
CPython uses the same target triplet convention as Rust: ``` $ rustc --print target-list | grep wasm wasm32-unknown-emscripten wasm32-unknown-unknown wasm32-wasi wasm64-unknown-unknown ``` Signed-off-by: Christian Heimes <christian@python.org>
aa16619 to
d4fba93
Compare
This seems like a great idea! Plus there will definitely need to be more patches for WASI, and probably Emscripten as well, so we can coordinate there if needed.
Certainly could! I was mostly seeing if I could get things to build at all before I went to bed. I'll probably play with things more tomorrow (and hopefully have something to show for it). |
|
+1 for Brett's proposal. Progress! I'm now getting a different error from wasmtime. My emscripten version may not support pthread. |
Great! Unfortunately I don't think wasmtime supports pthreads. The only WASM runtime that I could find that did was https://github.com/bytecodealliance/wasm-micro-runtime Wasmer seems to stub pthread out https://github.com/wasmerio/wasmer/blob/master/lib/emscripten/src/pthread.rs, but maybe it just passes those through? |
CPython uses the same target triplet convention as Rust:
Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue40280